from email.mime.text import MIMEText
from smtplib import SMTP_SSL
from  email.utils import formataddr

def email(email_list,content,subject='抽屉新热榜-用户注册'):
    msg = MIMEText(content,'plain','utf-8')
    msg['From'] = formataddr(['抽屉新热榜','734233228@qq.com'])
    msg['Subject'] = subject

    server = SMTP_SSL('smtp.qq.com')
    server.login('734233228','dxtesfbghhtsbfca')
    server.sendmail('734233228@qq.com',email_list,msg.as_string())
    server.quit()

